package io.renren.modules.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.R;
import io.renren.modules.combat.entity.TFightInformationEntity;
import io.renren.modules.generator.entity.TTrainingEntity;
import io.renren.modules.statistis.statistisEntity;
import io.renren.modules.user.entity.*;
import io.renren.modules.user.entity.vo.PeopleCountVo;
import io.renren.modules.user.entity.vo.PeopleHistoryVo;
import io.renren.modules.user.entity.vo.PeopleVo;
import io.renren.modules.user.entity.vo.PeopleZZVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestBody;


import java.util.List;
import java.util.Map;

/**
 * 人员
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2019-08-02 10:30:00
 */
public interface TPeopleService extends IService<TPeopleEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /*
    * 人员分布图(消防员)
    * */
    List<PeopleVo> findPeopleList(String parentId,String squadron);
    /*
    * 人员分布图(专职消防员)
    * */
    List<PeopleZZVo> findPeopleZZList(String parentId,String squadron);

    /*
     * 支队人员分布图(班组消防员)
     * */
    List<PeopleVo> findPeopleClassesList(Integer deptId);
    /*
     * 支队人员分布图(班组专职消防员)
     * */
    List<PeopleZZVo> findPeopleClassesZZList(Integer deptId);

    PageUtils queryPageList(Map<String, Object> params);

    /*
    * 历史人员
    * */
    List<PeopleHistoryVo> peopleHistory(Integer peopleType, String deptId,String year,String squadron);

    /*
     * 历史人员中队
     * */
    List<PeopleHistoryVo> peopleHistoryDept(Integer peopleType, String deptId,String year,String zdeptId);

    /*
     * 历史人员组
     * */
    List<PeopleHistoryVo> peopleHistoryClasses(Integer peopleType, String deptId,String year);
    /*
    * 个人信息查询
    * */
    TPeopleEntity findPeople(Integer peopleId);
    /*
    *  个人履历
    * */
    List<TPeopleResumeEntity> findPeopleResume(Integer peopleId);
    /*
    * 战斗经历
    * */
    List<TFightInformationEntity> findFight(Integer peopleId);

    /*
    * 人员信息统计
    * */
    List<TPeopleEntity> peopleCount();
    /*
     * 支队人员信息统计
     * */
    List<TPeopleFireDetachmentEntity> peopleDeptCount();
    /*
     * 人员衔级统计
     * */
    List<TPeopleDictionaryEntity> peopelTitleCount();
    /*
     * 合同期限分布图
     * */
    List<PeopleZZVo> peopleContractCount();


    /*
    * 自主分析
    * */
    List<TPeopleEntity> peopelStatistics(String deptId);

    /*
    * 人员审批
    * */
    R peoplApply(TPeopleEntity tPeople);

    /*
    * 申请退出
    * */
    R updatePeopleOut(TPeopleOutEntity tPeopleOutEntity);

    /*
    * 单位人
    * */
    PeopleCountVo peopledeptCount(String deptId);
    /*
     * 人员
     * */
    PeopleCountVo peopledeptCount1(String deptId);
    /*
     * 人员
     * */
    PeopleCountVo peopledeptCount2(String deptId,String classes);


    /*
     * 中对统计信息
     * */
    List<PeopleVo> peopleListInfo( String deptId,String zdeptId);


    /*
     * 中队专职消防员
     * */
    List<PeopleZZVo> findPeopleZList(String parentId,String zdeptId);

    /*个人训练信息查询*/
    List<TTrainingEntity> findPeopleTTraining(Integer personId);

    /*
     * 消防总队
     * */
    PeopleVo findAllDept();

    /*
     * 专职总队
     * */
    PeopleZZVo findALLZZDept(statistisEntity peopleVo);

    /*
     * 历史总队
     * */
    PeopleHistoryVo peopleAllHistory(statistisEntity peopleVo);

    /**
     * 总队数据
     */
    List<PeopleVo> totalCount(statistisEntity peopleVo);

    /**
     * 根据身份证号查询人员信息
     * @param idcard
     * @return
     */
    TPeopleEntity getPeopleInfoByIdCard(String idcard);
}

